import {BasicColumn} from '/@/components/Table';
import {FormSchema} from '/@/components/Table';
import { rules} from '/@/utils/helper/validator';
import { render } from '/@/utils/common/renderUtils';
//列表数据
export const columns: BasicColumn[] = [
   {
    title: '通话服务商组织id',
    align:"center",
    dataIndex: 'orgId'
   },

   {
    title: '通话服务商组织名称',
    align:"center",
    dataIndex: 'orgName'
   },

   {
    title: '平台组织',
    align:"center",
    dataIndex: 'ecardPdepid_dictText'
   },
];
//查询数据
export const searchFormSchema: FormSchema[] = [
  {
    label: '通话服务商组织名称',
    field: 'orgName',
    component: 'JInput',
  },
];
//表单数据
export const formSchema: FormSchema[] = [
  {
    label: '通话服务商组织id',
    field: 'orgId',
    component: 'InputNumber',
    dynamicRules: ({model,schema}) => {
          return [
                 { required: true, message: '请输入组织id!'},
          ];
     },
  },

  {
    label: '通话服务商组织名称',
    field: 'orgName',
    component: 'Input',
    dynamicDisabled:true,
  },
  {
    label: '上级父级id',
    field: 'parentId',
    component: 'InputNumber',
    dynamicDisabled:true,
    show: false
  },
  {
    label: '平台组织',
    field: 'ecardPdepid',
    component: 'JSelectDept',
    componentProps:{
      checkStrictly:false,
      multiple:false
    },
  },
/*  {
    label: '组织id',
    field: 'organizationId',
    component: 'InputNumber',
  },*/
  {
    label: 'id',
    field: 'id',
    component: 'Input',
    show: false
  },
];

// 高级查询数据
export const superQuerySchema = {
  orgId: {title: '组织id',order: 0,view: 'number', type: 'number',},
  xxbm: {title: 'xxbm',order: 1,view: 'text', type: 'string',},
  orgName: {title: '组织',order: 2,view: 'text', type: 'string',},
  parentId: {title: '父级id',order: 3,view: 'number', type: 'number',},
  ecardPdepid: {title: '班级父级id',order: 4,view: 'number', type: 'number',},
  organizationId: {title: '组织id',order: 5,view: 'number', type: 'number',},
};

/**
* 流程表单调用这个方法获取formSchema
* @param param
*/
export function getBpmFormSchema(_formData): FormSchema[]{
  // 默认和原始表单保持一致 如果流程中配置了权限数据，这里需要单独处理formSchema
  return formSchema;
}
